Repository navigation
test(mimo): skip native-lane tests on machines without the lane - #192
Conversation
Since eeba2af (#178), 31 XCTest cases in five MiMo suites throw nativeLaneRequired on the hosted CI runner, so every run of Fork Tests on main fails. The tests need the exclusive native GPU lane, which the runner does not have. This change turns each of those throws into an XCTSkipUnless on the same environment variables. The tests now skip, with the reason, on a machine without the lane, and run as before where the variables are set. The unused nativeLaneRequired enum case is removed from each suite. Tests only. No production code change. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Fork Tests on head 79fd164: run 36741368847. Result: failure, from tests that other PRs cover. Every dedicated suite step passed, including Whole-package pass ("Run all test suites once"):
|
|
Main commit 0871943 (#205) added three tests to the gated suites that fail the same way (run 36769006274: 34 failing native-lane tests, all Fork Tests on head 2f9bd64: run 36784851256. Result: failure, from tests that other PRs cover. Every dedicated suite step passed. Whole-package pass:
|
#289) * fix(cache): preserve demanded fork checkpoints and bound short capture * test: let expected paged work refusals reach the caller (#209) PagedWorkFixture.prepare wrapped prepareAttentionWork in XCTUnwrap. XCTUnwrap records a test failure when its expression throws, also when the caller expects the throw with XCTAssertThrowsError. Three tests expect prepare to refuse, so each expected refusal was recorded as a failure. prepare now throws the refusal to the caller and fails only when prepareAttentionWork returns nil. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit b7bbdc2) * fix(paged): write a full destination for broadcast direct KV (#210) Materialize broadcast retained KV into a complete contiguous destination while preserving bit values, ownership validation, and reservation bounds. Focused differential paging, lifetime, and bit-exact validation completed during review. (cherry picked from commit 3799b11) * test(mimo): skip native-lane tests on machines without the lane (#192) Since eeba2af (#178), 31 XCTest cases in five MiMo suites throw nativeLaneRequired on the hosted CI runner, so every run of Fork Tests on main fails. The tests need the exclusive native GPU lane, which the runner does not have. This change turns each of those throws into an XCTSkipUnless on the same environment variables. The tests now skip, with the reason, on a machine without the lane, and run as before where the variables are set. The unused nativeLaneRequired enum case is removed from each suite. Tests only. No production code change. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> (cherry picked from commit c288f53) * test(mimo): assert the MiMo contracts that #171 shipped (#211) Three assertions in the MiMo tests disagree with the code that the same PR (#171) added: - The MiMo cache conforms to CBv2MTPRectangularSerializing, and MiMoV26RectangularVerifyTests asserts that the bank supports rectangular MTP verification. The test asserted the opposite. - CBv2PrefillRequirement.evaluationOnly returns a [B, 1] handle (EngineLoopV2.prefillOutput). The test expected shape [1]. - MiMoV26MTPAssistant conforms to CBv2HistoricalMTPPrefixCheckpointCoding (MiMoV26MTPPrefixCheckpoint). The test asserted that it is not a prefix checkpoint drafter. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 5e9d268) * test: run bit-exact reference tests only on reference hardware (#174) * style: format DiffusionGemmaVisionOracleTests.swift Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * style: format DiffusionGemmaFactoryTests.swift Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: run bit-exact reference tests only on reference hardware Nine DiffusionGemma tests compare float bits with frozen references. On the hosted macos-26 runner (Apple M1 VM) they differ in the low bits, with no change in shape, dtype or sign. Add a `.referenceHardware` Swift Testing trait that runs a test only when MLX_REFERENCE_HARDWARE=1, and mark the nine tests with it. Elsewhere they report as skipped with the reason. No assertion, tolerance or reference changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: gate only the bit comparisons of mixed DiffusionGemma tests Three gated tests also held checks that pass on any hardware. Split them so only the bit-for-bit comparison is gated: - prefixIdentityTokensOwnerAndEmptyStateFailClosed() runs its fail-closed probes on all hardware. The donor-logits bit comparison moves to failClosedProbesLeaveDonorLogitsBitExact(). - nativeFactoryLoadsExactStateAndReleasesItsModel() keeps the load and model-release checks on all hardware. The logits bit comparison moves to nativeFactoryDenoiseMatchesReferenceBits(). - The two parameterized vision tests run their bf16 case on all hardware. The fp32 case moves to a separate gated test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: gate only the reference comparisons of three more DiffusionGemma tests Split the three tests that were still gated whole, so their checks that pass on any hardware run everywhere: - chunkedSessionBoundsPrefillAndCanCancelAfterPrefill() keeps the prefill bounds, the complete flag, the counters, cancel, the emitted checkpoint and the released cache for widths 1, 3 and 7. The KV and logits bit comparisons move to chunkedSessionMatchesIndependentNativeReference(). - sharedWeightsConditioningKeepsCommittedCacheState() keeps the fixture checks, both cache positions and the unchanged encoder KV after the provisional canvas. The reference comparisons stay in sharedWeightsConditioningAndCommittedCacheMatchReference(). - committedPrefixRestoreKeepsPositionsAfterDonorRetirement() keeps the token count, retained bytes, donor release and both positions. The reference comparisons stay in committedPrefixRestoreIsExactAfterDonorAppendAndRetirement(). Each pair shares one helper. The fixture reference, case-count and parameter-count checks of the block and fp32 vision fixtures also run everywhere now, in blockOracleFixtureIsPinned() and fp32FixtureIsPinned(). CONTRIBUTING.md says which comparisons the gate covers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit a046367) * docs: describe demanded checkpoints and their shared fixture * fix(cache): honor request participation in short checkpoint scheduling * Preserve demanded checkpoint eligibility through preemption and packing * test: size the slot-cap request from what the ledger accepts slotCapLeavesRoomForServing() sized its request from bytesReserved. bytesReserved includes the paged pool's physical-floor overhead, which a request's target KV replaces when it reserves. The overhead depends on the buffer sizes the MLX allocator returns: a 36,864-byte segment gets a 49,152-byte buffer, or a 65,536-byte buffer reused from the process-wide cache. When earlier work left 64 KiB buffers in the cache, the capped arm left more than 5.5 windows of real slack instead of half a window, and the uncapped arm's reservation fit. Find the largest request the ledger accepts beside the capped set with trial reservations, then take half a window off it. The assertions do not change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 06224a8) * Retain demanded native frontiers and preserve observed prefill endpoints * Document current SDK parameters and generation links * Disambiguate the task generation documentation link --------- Co-authored-by: David Tai <dtaipublic@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* support for audio resources - see Layr-Labs#192, Layr-Labs#194 - this adds representation of audio in UserInput and LMInput
Proposed changes
Since main commit eeba2af (#178, the MiMo merge), every run of Fork Tests on main fails. The whole-package pass reports 37 XCTest failures. Run 36680221760 on main d83912f lists them. The run before #178 (run 36618524832 on ef3bdaa) has no
nativeLaneRequirederror.31 of the 37 fail with
failed: caught error: "nativeLaneRequired". Main commit 0871943 (#205) then added three tests to the same suites with the same error (run 36769006274). This PR merges that main commit, so the gate covers 34 tests. Each of these tests calls afixture()helper, or its own guard, that throws when theMIMO_V26_*environment variables of the exclusive native GPU lane are not set. The hostedmacos-26runner does not set them, so the tests fail instead of skipping.This PR turns each of those throws into
XCTSkipUnlesson the same environment variables. The tests now skip on a machine without the lane, with a message that names the variables. They run as before where the variables are set. The other MiMo suites (for exampleMiMoV26FactoryTests,MiMoV26VisionTests) already skip this way. The unusednativeLaneRequiredenum case is removed from each suite.Tests only. No production code change. The tests are XCTest, so the
.referenceHardwaretrait of #174 does not apply.Gating condition
1MiMoV26NativeMediaDeadlineTestsMIMO_V26_SERIAL_NATIVE_TESTS,MIMO_V26_NATIVE_MEDIA_DEADLINE_TESTSMiMoV26ManagedDecodedAudioTestsMIMO_V26_SERIAL_NATIVE_TESTS,MIMO_V26_MANAGED_AUDIO_NATIVE_TESTS; the threetestInnerRequired*fault tests also needMIMO_V26_MANAGED_AUDIO_FAULT_TESTMiMoV26RectangularVerifyNativeTestsMIMO_V26_SERIAL_NATIVE_TESTS,MIMO_V26_RECTANGULAR_NATIVE_TESTSMiMoV26ManagedCompletePrefixTestsMIMO_V26_SERIAL_NATIVE_TESTS,MIMO_V26_MANAGED_AUDIO_NATIVE_TESTSMiMoV26ManagedAudiovisualTestsMIMO_V26_SERIAL_NATIVE_TESTS,MIMO_V26_MANAGED_AUDIO_NATIVE_TESTS,MIMO_V26_DECODED_AV_NATIVE_TESTSThe three
testInnerRequired*fault tests share one helper,assertRequiredInnerFailure, which holds the gate. They also skip in a release build, because the fault hook exists only in debug builds. Before, it threwnativeLaneRequiredthere too.Gated tests (34)
Every test below shows
nativeLaneRequiredin the log of run 36680221760, or of run 36769006274 for the three marked (#205).MiMoV26NativeMediaDeadlineTests(11):MiMoV26ManagedDecodedAudioTests(12):MiMoV26RectangularVerifyNativeTests(5):MiMoV26ManagedCompletePrefixTests(3):MiMoV26ManagedAudiovisualTests(3):Not gated
The other 6 of the 37 failures do not show
nativeLaneRequired. They fail for other reasons and are not changed by this PR:CBv2PagedAttentionWorkReservationTests.testCoexistingGenerationsHaveIndependentChargesUntilBothCompletebackendIneligible(reason: "step-owned paging has no valid engine/process/stream preparation")CBv2PagedAttentionWorkReservationTests.testLocalAndProcessTightCapsRefuseBeforeAnyCursorPageOrFenceMutationcapacityExhausted(needed: 747778, available: 747777)CBv2PagedAttentionWorkReservationTests.testPackedRowsWithDifferentActualRangesStayIndependentbackendIneligible(reason: "retained paged producer root is not a bounded compact destination")CBv2PagedAttentionWorkReservationTests.testSameGeometryWrongBorrowerOwnerRefusesBeforeReadingOrChangingFencebackendIneligible(reason: "paged work row/cache identity, generation or frozen range mismatch")MiMoV26CBv2Tests.testNativeContiguousAdaptercache capability widened,intermediate constructed vocabulary logitsMiMoV26MTPEngineTests.testRequestIsolationMeasuredOwnershipAndReleaseXCTAssertFalse failedatMiMoV26MTPEngineTests.swift:345The 7 DiffusionGemma bit-exact tests are covered by #174.
CBv2SchedulerLoopTestsis covered by #191.Dedicated CI steps
scripts/run-nested-suite.shfails a step when a suite skips a test. None of the five gated suites runs in a dedicated step of.github/workflows/fork-tests.yml. They run only in the whole-package pass ("Run all test suites once"), which allows skips. The d-inference CI runs no MiMo suite through the script. So no workflow change is needed.Test plan
swift format format --in-place --configuration .swift-formaton the five changed files: no change.scripts/check_forkdiff.py --upstream-ref refs/remotes/upstream/main: passes.fork.yamlalready describesTests/MLXLMTests/MiMo/**.Checklist
Put an
xin the boxes that apply.pre-commit run --all-filesto format my code / installed pre-commit prior to committing changes: every changed Swift file is formatted withswift format format --configuration .swift-formatDependencies
None. Based on
mainat d83912f, withmainat 0871943 (#205) merged in.Authorship
The commit was written by Claude Fable 5.1.
🤖 Generated with Claude Code